package com.sls.web.manager.action.recharge;

import javax.annotation.Resource;

import com.sls.web.manager.action.SuperAction;
import com.sls.web.manager.common.Constants;
import com.sls.web.manager.page.Pagination;
import com.sls.web.manager.recharge.pojo.SupplierAccountLog;
import com.sls.web.manager.recharge.querybean.SupplierAccountLogQuery;
import com.sls.web.manager.recharge.service.SupplierAccountLogService;

public class SupplierAccountLogAction extends SuperAction {
	private static final long serialVersionUID = -2179052449278286881L;
	@Resource(name = "supplierAccountLogService")
	private SupplierAccountLogService supplierAccountLogService;
	/**
	 * 返回分页对象
	 */
	public Pagination<?> page;
	private SupplierAccountLogQuery supplierAccountLogQuery;
	private SupplierAccountLog supplierAccountLog;
	private String id;

	public Pagination<?> getPage() {
		return page;
	}

	public void setPage(Pagination<?> page) {
		this.page = page;
	}

	public SupplierAccountLogQuery getSupplierAccountLogQuery() {
		return supplierAccountLogQuery;
	}

	public void setSupplierAccountLogQuery(
			SupplierAccountLogQuery supplierAccountLogQuery) {
		this.supplierAccountLogQuery = supplierAccountLogQuery;
	}

	public SupplierAccountLog getSupplierAccountLog() {
		return supplierAccountLog;
	}

	public void setSupplierAccountLog(SupplierAccountLog supplierAccountLog) {
		this.supplierAccountLog = supplierAccountLog;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	// 列表
	public String list() {
		if (supplierAccountLogQuery == null) {
			supplierAccountLogQuery = new SupplierAccountLogQuery();
			supplierAccountLogQuery.setPageSize(Constants.INIT_PAGESIZE);
			supplierAccountLogQuery.setCurrentPage(Constants.INIT_CURRENTPAGE);
		}
		try {
			supplierAccountLogQuery.setSupplierAccountId(id);
			page = supplierAccountLogService.queryLog(supplierAccountLogQuery,
					getCurrentOperator());
		} catch (Exception e) {
			return ERROR;
		}

		return "list";
	}
}